<template>
  <div class="layout-page">
    <div class="layout-page-inner">
      <el-button @click="useDialogFunc" class="global">打开弹窗</el-button>
      <el-button type="primary" @click="doAxios">全局api</el-button>
    </div>
  </div>
</template>

<script setup>
import { dialogFunc } from "@/utils/dialogFunc";

const $api = inject("$api");

const useDialogFunc = async () => {
  const data = await dialogFunc();
  ElMessage.success(`姓名：${data.nickname}, 密码：${data.password}`);
};

const doAxios = () => {
  $api.test.doApi();
};
</script>

<style scoped lang="less"></style>
